/**
 * 
 */
package cn.com.innodev.withyou.business.api.noti;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * @author shipeng
 */
public abstract class AbstractNotification {

  /** 通知ID */
  private String id;
  /** 通知内容 */
  private String notiContent;
  /** 通知写入时间 */
  private Date sysInsertTime;
  /** 通知读取时间 */
  private Date readSysInsertTime;
  /** 是否读取 */
  private boolean readable = false;
  /** 通知参数 */
  private Map<String, Object> params = new HashMap<>();

  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public String getNotiContent() {
    return notiContent;
  }

  public void setNotiContent(String notiContent) {
    this.notiContent = notiContent;
  }

  public Date getSysInsertTime() {
    return sysInsertTime;
  }

  public void setSysInsertTime(Date sysInsertTime) {
    this.sysInsertTime = sysInsertTime;
  }

  public Date getReadSysInsertTime() {
    return readSysInsertTime;
  }

  public void setReadSysInsertTime(Date readSysInsertTime) {
    this.readSysInsertTime = readSysInsertTime;
  }

  public boolean isReadable() {
    return readable;
  }

  public void setReadable(boolean readable) {
    this.readable = readable;
  }

  public Map<String, Object> getParams() {
    return params;
  }

  public void addParam(String name, Object value) {
    this.params.put(name, value);
  }

  public void addParams(Map<String, Object> params) {
    if (params == null || params.size() <= 0) {
      return;
    }
    this.params.putAll(params);
  }

}
